package cbh.tool.scheduler;

import java.util.concurrent.*;

/**
 * Created by hx-pc on 16-4-5.
 */
public class ProcessFactory {

    private static ScheduledExecutorService executorService;
    private static final Object sync = new Object();

    static {
        if(executorService == null) {
            synchronized (sync) {
                if(executorService == null) {
                    executorService = Executors.newScheduledThreadPool(15);
                }
            }
        }
    }

    public static ScheduledExecutorService getScheduledExecutorService() {
        return executorService;
    }

}
